// #pragma once
#ifndef __LOG_H__ // 防止重复定义
#define __LOG_H__

#include <iostream>
#include <strings.h>
#include <mutex>

#define LOGAPP logger::getInstance()

class logger
{
public:
    static logger* getInstance();
    ~logger() {}

    void log(const std::string& msg);

private:
    logger();
private:
    static logger* self;
    static std::mutex selfMutex;
};

#endif //__LOG_H__